import { format, parse } from 'date-fns';

export const getShortDate = (date: string) => {
  if (!date) {
    return '';
  }

  return format(parse(date, 'yyyy-MM-dd HH:mm:ss', new Date()), 'yyyy-MM-dd');
}
